package org.client.iot.ui.device.monitorDataFragment;

import static org.client.iot.constant.GlobeConstant.MonitorData.*;

import android.os.Bundle;
import android.view.View;
import org.client.iot.databinding.FragmentMonitorChartBinding;
import org.client.iot.ui.device.MonitorDataActivity;
import org.tzw.template.base.BaseFragment;


public class MonitorChartFragment extends BaseFragment<FragmentMonitorChartBinding> implements MonitorDataActivity.TimeRangeUpdatable {
    
    public static MonitorChartFragment newInstance(String startDate, String endDate) {
        MonitorChartFragment fragment = new MonitorChartFragment();
        Bundle args = new Bundle();
        args.putString(ARG_START_DATE, startDate);
        args.putString(ARG_END_DATE, endDate);
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    protected void initData(View view) {
        Bundle args = getArguments();
        if (args != null) {
            String startDate = args.getString(ARG_START_DATE);
            String endDate = args.getString(ARG_END_DATE);
            // 使用时间参数加载数据
        }
    }

    @Override
    protected void initListener() {

    }

    @Override
    protected void initView(View view) {

    }

    @Override
    public void updateTimeRange(String startDate, String endDate) {
        // 更新图表数据
    }
}